/*
 * @(#) AttendanceService.java 2011-9-17
 *
 * Copyright (c) 2011, Strong Technology. All Rights Reserved.
 * Strong Technology. CONFIDENTIAL
 */
package cn.strong.gweva.attendance.business.service;

import cn.strong.gweva.attendance.business.entity.AttendanceRecordEntity;
import cn.strong.gweva.attendance.business.entity.AttendanceRecordSearchEntity;
import cn.strong.gweva.common.business.entity.LoginEntity;
import cn.strong.gweva.common.business.entity.PagerEntity;

/**
 * 日常考勤业务处理接口。
 * 
 * @author lilanfei
 * @version 1.0
 * @since 2011-9-17
 */
public interface AttendanceService
{
	
	/**
	 * 检索考勤记录分页信息
	 * 
	 * @param pagerEntity
	 * @param searchEnity 检索用考勤记录信息
	 * @return 用户分页信息
	 * @throws Exception
	 */
	public PagerEntity searchAttendanceRecordPage(PagerEntity pagerEntity, AttendanceRecordSearchEntity searchEnity) throws Exception;
	
	/**
	 * 通过考勤记录编号，检索考勤记录信息。
	 * 
	 * @param attendanceId 考勤记录编号
	 * @return
	 * @throws Exception
	 */
	public AttendanceRecordEntity searchAttendanceRecordById(Integer attendanceId) throws Exception;
	
	/**
	 * 校验考勤记录的唯一性
	 * 
	 * @param attendanceRecord 考勤记录
	 * @return 记录件数
	 * @throws Exception
	 */
	public int checkUniqueness(AttendanceRecordEntity attendanceRecord) throws Exception;

	/**
	 * 新增考勤记录
	 * 
	 * @param attendanceRecord 考勤记录
	 * @param loginUser 登录用户
	 * @return 考勤记录
	 * @throws Exception
	 */
	public AttendanceRecordEntity insert(AttendanceRecordEntity attendanceRecord, LoginEntity loginUser) throws Exception;
	
	/**
	 * 通过考勤记录编号，逻辑删除考勤记录。
	 * 
	 * @param attendanceRecord 考勤记录
	 * @param loginUser 登录用户
	 * @return
	 * @throws Exception
	 */
	public int logicDeleteById(AttendanceRecordEntity attendanceRecord, LoginEntity loginUser) throws Exception;
	
	/**
	 * 通过考勤记录编号，删除考勤记录。
	 * 
	 * @param attendanceId 考勤记录编号
	 * @return
	 * @throws Exception
	 */
	public int deleteById(Integer attendanceId) throws Exception;
	
	/**
	 * 更新考勤记录信息。
	 * 
	 * @param attendanceRecord 更新的考勤记录信息
	 * @param loginUser 登录的用户
	 * @return
	 * @throws Exception
	 */
	public int update(AttendanceRecordEntity attendanceRecord, LoginEntity loginUser) throws Exception;
}
